// pages/water/recharge/record/index.js
var app = getApp()
var common_Js = require("../../../../component/common.js"), fetchApi = require("../../../../utils/httpPost.js")
import Toast from '../../../../component/vant/toast/toast';
const CryptoJS = require("../../../../utils/aesUtil.js")
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 获取页面数据的 http请求
   */
  onHttpInit: function () {
    var that = this;
    fetchApi.httpPost('/device/water/recharge/view', {
      card_id: that.data.card_id,
    }, function (res) {
      if (res.data.code == 0) {
        console.log("水卡充值界面加载数据返回数据", res.data.data)
        that.setData({
          moneys: res.data.data.moneys,
        })
        that.setData({ 
          isLoading: false, loading: true, netWork: true, 
        })
      } else {
        console.log("水卡充值界面加载数据 异常", res.data.msg)
      }
    }, function () {
      that.setData({ isLoading: false, loading: true, netWork: true, })
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },
})